<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10" />
<title><?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */
	global $page, $paged;

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add the blog description for the home/front page.
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );

	?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
	/* We add some JavaScript to pages with the comment form
	 * to support sites with threaded comments (when in use).
	 */
	if ( is_singular() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	/* Always have wp_head() just before the closing </head>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to <head> such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
?>

<script type="text/javascript">
var home_url = '<?php echo home_url(); ?>';
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/lib.js"></script>

</head>
<?php $bclass=array((is_single() || is_page()) ? 'item':'index');?>
<body <?php body_class($bclass); ?>>
	<header>
		<nav id="main">
			<a href="<?php echo home_url();?>" class="home">Trang ch&#7911;</a>
			<a href="#" show="cate" class="cate drop<? echo (is_archive()) ? '' : ' selected';?>">Chuy&#234;n m&#7909;c</a>
			<? if (is_archive()) : ?>
			<a href="#" show="sort" class="sort drop selected">S&#7855;p x&#7871;p</a>
			<? endif; ?>
		</nav>
		<nav id="sub">
			<? if (is_archive()) : ?>
			<div class="nav" id="sort">
				<a href="#newest" class="newest selected">M&#7899;i nh&#7845;t</a>
				<a href="#most" class="most">&#272;&#7885;c nhi&#7873;u</a>
				<a href="#unread" class="unread">Ch&#432;a &#273;&#7885;c</a>
			</div>
			<? endif; ?>
			<div class="nav <? echo (is_archive()) ? ' hide' : '';?>" id="cate">
				<a href="<?php echo home_url();?>/category/kien-truc">Ki&#7871;n tr&#250;c</a>
				<a href="<?php echo home_url();?>/category/khoa-hoc">Khoa h&#7885;c</a>
				<a href="<?php echo home_url();?>/category/ky-quac">K&#7923; qu&#7863;c</a>
			</div>
		</nav>
		
		<div class="banner">
			<div class="bg">
			</div>
			<div class="overlay">
			</div>
		</div>
		<div class="brand">
		<?php if (is_single() || is_page()){?><h2 class="logo"><?php } else { ?><h1 class="logo"><?php }?>
			<a class="logo" href="<?php echo home_url();?>" title="tamsao.com">
				<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" width="293" height="93" title="tamsao.com" alt="tamsao.com logo"/>
			</a>
		<?php if (is_single() || is_page()){?></h2><?php } else { ?></h1><?php }?>
		<? if (0): ?>
			<p class="description">
				<?php echo get_bloginfo( 'description', 'display' );?>
			</p>
		<? endif;?>
			<?php get_search_form();?>
			
		</div>
	</header>
	
	<div class="clear"></div>
	<div id="primary">
	
	<? if (!is_home()) : ?>
		<div class="breakcrumb">
			<?php breakcrumb();?>
		</div>
	<? endif; ?>
	
	<? if (0) : ?>
		<div class="online"></div>
	<? endif; ?>
